<div class="search mt15 clearfix">
    <div style="width:113px" class="fl">
        <div class="select" ui-combobox data="searchType"
             ng-model="query.searchField" text-field="text" value-field="value">
        </div>
    </div>
    <input type="text" name="" class="input-text mr5 fl" value="" ng-enter="getSimpleList()"
           ng-model="query.searchValue" style="width: 366px;">
    <a class="btn" ng-click="getSimpleList()">搜索</a>
</div>

<!--公共客户-->
<table width="100%" class="mt10">
    <tbody>
    <tr>
        <td align="right" class="form-cell w60" valign="top">原业务员：</td>
        <td>
            <div style="width:366px" class="fl limit-ie f12">
                <div class="select" ui-filtercombobox data="allSalerList"
                     ng-model="query.user_id_old">
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td align="right" class="form-cell w60" valign="top">客户状态：</td>
        <td>
            <div style="display:block;padding-top: 7px;">
                <div class="tips-list clearfix ml0">
                    <label class="checkbox" ng-repeat="stage in stageList">
                        <input type="checkbox" ng-model="query.stages[$index].checked">
                        <span>{{stage.Text}}</span>
                    </label>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td align="right" class="form-cell w60" valign="top">意向级别：</td>
        <td>
            <div style="display:block;padding-top: 7px;">
                <div class="tips-list clearfix ml0">
                    <label class="checkbox" ng-repeat="followlevel in followlevelList">
                        <input type="checkbox" ng-model="query.followlevels[$index].checked">
                        <span>{{followlevel.Text}}</span>
                    </label>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td align="right" class="form-cell w60" valign="top">最近跟进：</td>
        <td>
            <div class="fl clearfix ng-scope">
                <input type="text" class="input-text input-data fl ng-pristine ng-valid ng-touched"
                       readonly="" id="start_date"
                       ui-date=""
                       format="yyyy-MM-dd"
                       max-date="#F{$dp.$D(\'end_date'\)}"
                       ng-model="query.last_date_start">
                <span class="fl lh30">&nbsp;&nbsp;-&nbsp;&nbsp;</span>
                <input type="text" class="input-text input-data fl ng-pristine ng-valid ng-touched"
                       readonly="" id="end_date"
                       ui-date=""
                       format="yyyy-MM-dd"
                       min-date="#F{$dp.$D(\'start_date'\)}"
                       ng-model="query.last_date_end">
                <a href="javascript: void(0)" class="btn fl mlr5" ng-click="getHighList()">查询</a>
                <a href="javascript: void(0)" class="btn btn-gray fl"
                   ng-click="resetGetList()">撤销筛选</a>
            </div>
        </td>
    </tr>
    </tbody>
</table>
<div class="table-header mt20 clearfix">
    <span class="fl lh30 f14">垃圾客户列表</span>
    <!--<div ng-show="checkAll">-->
        <!--<div class="fl lh30 ml25 f14" style="padding-top: 3px;" >-->
            <!--<label class="checkbox">-->
                <!--<input type="checkbox" ng-model="checkCountAll" ng-change="checkAllChange(tableList.list, checkAll = checkCountAll)">-->
                <!--<span style="font-size: 14px;">选中全部</span>-->
            <!--</label>-->
        <!--</div>-->
        <!--<span class="fl lh30 ml10 f14" ng-show="checkCountAll">已经选中<span class="c-orange">{{tableList.total}}</span>条记录</span>-->
    <!--</div>-->
    <div class="fr btn-group">
        <a href="javascript: void(0)"
           class="btn fl permission p-50020305-24"
           ng-click="recoverCustomerService.recoverRubbishAllCustomer(curProjectId,getCheckList(tableList.list),getList)">
            批量回收
        </a>
    </div>
</div>
<div id="grid" class="table-wrap text-center mt10">
    <table width="100%" style="line-height: 22px;">
        <thead>
        <tr>
            <th width="50" style="padding-top: 3px;">
                <label class="checkbox">
                    <input type="checkbox" ng-model="checkAll" ng-change="checkAllChange(tableList.list, checkAll)">
                    <span>序号</span>
                </label>
            </th>
            <th class="text-center" width="80">姓名</th>
            <th class="text-center" width="80">电话</th>
            <th class="text-center" width="100">原业务员</th>
            <th class="text-center" width="80">客户状态</th>
            <th class="text-center" width="80">意向级别</th>
            <th class="text-center" width="150" style="cursor: pointer;" ng-click="query.sort_order = (query.sort_order === 'desc' ? 'asc':'desc');getList()">
                最近跟进时间
                <a class="ml5">
                    <i class="sort_icon" ng-class="{sort_down:query.sort_order === 'desc',sort_up:query.sort_order === 'asc'}"></i>
                </a>
            </th>
            <th class="text-center" width="70">跟进方式</th>
            <th class="text-center" width="100">操作<a class="fr ml15 c-orange mr5" ng-click="getList()"><i class="freshen"></i></a></th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="row in tableList.list">
            <td height="34" style="text-align: left;">
                <label class="checkbox">
                    <input type="checkbox" ng-model="row.checked" ng-change="checkChange(tableList.list)">
                    <span>{{(query.page_index-1)*query.page_size+$index+1}}</span>
                </label>
            </td>
            <td>{{row.cst_name}}</td>
            <td style="text-align: left;" title="{{row.comms_all}}">{{row.comms_all | firstComma}}</td>
            <td class="">{{row.old_user_name}}</td>
            <td>{{row.stage_id_text}}</td>
            <td>{{row.follow_level_text}}</td>
            <td>{{row.last_date | myDateFormat:'yyyy-MM-dd HH:mm'}}</td>
            <td>{{row.gjfs_text}}</td>
            <td>
                <a class="c-orange mr5"
                   ui-dialog="查看客户"
                   ui-dialog-url="inc/dialog/customer_view.html"
                   ui-dialog-cache="false"
                   ui-dialog-init="cstInfoService.init(row.proj_id,row.cst_id,$dialogScope)"
                   ui-dialog-ok="">查看</a>
                <a class="c-orange mr5 permission p-50020305-24-inline"
                   ng-click="recoverCustomerService.recoverRubbishCustomer(row.proj_id,row.opp_id,getList)">回收</a></td>
        </tr>
        </tbody>
    </table>
    <div class="no-data  ng-hide" ng-show="tableList.list && tableList.list.length<1">
        <span>暂无数据</span>
    </div>
</div>
<div ui-pagination page-index="query.page_index" page-size="query.page_size" total="tableList.total"
     class="mt10" changed="getList($pageIndex)"></div>
<!--end公共客户-->